#include <iostream>

using namespace std;

int main() {
    int arr[] = {1, 2, 3, 4, 5};
    int *ptr = arr; // ptr指向arr的首元素

    for (int i = 0; i < 5; i++) {
        cout << "arr[" << i << "]的值为：" << arr[i] << endl;
        cout << "ptr指向的地址为：" << ptr << ", 值为：" << *ptr << endl;
        ptr++; // 移动指针指向下一个元素
    }

    return 0;
}